package de.fhtrier.gdw2.ships.game.modules;

import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.state.StateBasedGame;

import de.fhtrier.gdw2.ships.game.World;
import de.fhtrier.gdw2.ships.game.entities.Entity;

public abstract class Module
	{
		private int devLevel; //
		private int weight;
		private int price; // in ress
		private int x, y;
		private Entity target;

		public int getPrice()
			{
				return price;
			}

		public int getWeight()
			{
				return weight;
			}

		public int getLevel()
			{
				return devLevel;
			}

		public abstract void update(World w, GameContainer container, int delta, Entity e);

		public int getX()
			{
				return x;
			}

		public int getY()
			{
				return y;
			}

		public abstract void render(GameContainer container,
				StateBasedGame game, Graphics g);

		/**
		 * 
		 * Liefert Duplikat des Aufrufers als neues Objekt zurück.
		 * 
		 * @author Wendelin
		 * @param
		 */
		public abstract Module duplicateModule();


		public Entity getTarget()
			{
				return target;
			}

		public void setTarget(Entity target)
			{
				this.target = target;
			}

	}
